/**
 * 绕某个点在x方向上旋转
 * @param element 旋转元素
 * @param deg 旋转角度
 * @param oy 中心点y坐标
 * @param oz 中心点z坐标
 */
function rotateXAround (element, deg, oy, oz) {
  oy = oy || 0
  oz = oz || 0
  element.style.transformOrigin = '0 ' + oy + 'px ' + oz + 'px'
  element.style.transform = 'RotateX(' + deg + 'deg)'
}

function rotateYAround (element, deg, ox, oz) {
  ox = ox || 0
  oz = oz || 0
  element.style.transformOrigin = ox + 'px 0 ' + oz + 'px'
  element.style.transform = 'RotateY(' + deg + 'deg)'
}

function rotateZAround (element, deg, ox, oy) {
  ox = ox || 0
  oy = oy || 0
  element.style.transformOrigin = ox + 'px ' + oy + 'px 0'
  element.style.transform = 'RotateZ(' + deg + 'deg)'
}

function clearTransform (element) {
  element.style.transform = ''
}